package DAOtest;

import java.util.Map;

import org.junit.Test;

import DAO.UserDAO;

public class UserdaoTest {

	@Test
	public void UserAdd() {
		UserDAO dao = new UserDAO();
		int t = 0;
		try {
			t = dao.UserAdd("a", "aaa", null);
		} catch (Exception e) {
			System.out.println(e.getMessage());
			e.printStackTrace();
		}
		System.out.println(t);
	}

	@Test
	public void loginTest() {
		UserDAO dao = new UserDAO();
		Map<String, Object> t = null;
		try {
			t = dao.login("EXW1RU", "aaa");
		} catch (Exception e) {
			System.out.println(e.getMessage());
			e.printStackTrace();
		}
		System.out.println(t);
	}

	@Test
	public void updatePwdTest() {
		UserDAO dao = new UserDAO();
		int t = 0;
		try {
			t = dao.updatePwd("EXW1RU", "ttt");
		} catch (Exception e) {
			System.out.println(e.getMessage());
			e.printStackTrace();
		}
		System.out.println(t);
	}

}